FTP.FTPFileProxy (Apache Ant API)

org.apache.tools.ant.taskdefs.optional.net

## Class FTP.FTPFileProxy

- java.lang.Object
- - java.io.File
  - - org.apache.tools.ant.taskdefs.optional.net.FTP.FTPFileProxy

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<java.io.File>
  Enclosing class:
    FTP

      protected static class FTP.FTPFileProxy
      extends java.io.File

  internal class providing a File-like interface to some of the information available from the FTP server
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class java.io.File

      `pathSeparator, pathSeparatorChar, separator, separatorChar`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FTP.FTPFileProxy(org.apache.commons.net.ftp.FTPFile file)` creates a proxy to a FTP file
    `FTP.FTPFileProxy(java.lang.String completePath)` creates a proxy to a FTP directory

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `exists()`
    `java.lang.String` | `getAbsolutePath()`
    `java.lang.String` | `getName()`
    `java.lang.String` | `getParent()`
    `java.lang.String` | `getPath()`
    `boolean` | `isAbsolute()` FTP files are stored as absolute paths
    `boolean` | `isDirectory()`
    `boolean` | `isFile()`
    `boolean` | `isHidden()` FTP files cannot be hidden
    `long` | `lastModified()`
    `long` | `length()`

    - ### Methods inherited from class java.io.File

      `canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, getAbsoluteFile, getCanonicalFile, getCanonicalPath, getFreeSpace, getParentFile, getTotalSpace, getUsableSpace, hashCode, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FTP.FTPFileProxy

          public FTP.FTPFileProxy(org.apache.commons.net.ftp.FTPFile file)

      creates a proxy to a FTP file
      Parameters:
        `file` -

    - #### FTP.FTPFileProxy

          public FTP.FTPFileProxy(java.lang.String completePath)

      creates a proxy to a FTP directory
      Parameters:
        `completePath` - the remote directory.

  - ### Method Detail

    - #### exists

          public boolean exists()

      Overrides:
        `exists` in class `java.io.File`

    - #### getAbsolutePath

          public java.lang.String getAbsolutePath()

      Overrides:
        `getAbsolutePath` in class `java.io.File`

    - #### getName

          public java.lang.String getName()

      Overrides:
        `getName` in class `java.io.File`

    - #### getParent

          public java.lang.String getParent()

      Overrides:
        `getParent` in class `java.io.File`

    - #### getPath

          public java.lang.String getPath()

      Overrides:
        `getPath` in class `java.io.File`

    - #### isAbsolute

          public boolean isAbsolute()

      FTP files are stored as absolute paths
      Overrides:
        `isAbsolute` in class `java.io.File`
      Returns:
        true

    - #### isDirectory

          public boolean isDirectory()

      Overrides:
        `isDirectory` in class `java.io.File`

    - #### isFile

          public boolean isFile()

      Overrides:
        `isFile` in class `java.io.File`

    - #### isHidden

          public boolean isHidden()

      FTP files cannot be hidden
      Overrides:
        `isHidden` in class `java.io.File`
      Returns:
        false

    - #### lastModified

          public long lastModified()

      Overrides:
        `lastModified` in class `java.io.File`

    - #### length

          public long length()

      Overrides:
        `length` in class `java.io.File`